#include "DirectionLight.h"
#include "Scene.h"

LightSample DirectionLight::L(const Scene * scene, const Vector3 & position, const Vector3 & normal) const {
	if (shadow) {
		Color shadowColor = Colors::White;
		scene->traceShadow(Ray(position, direction), shadowColor);
		return LightSample(illuminance * shadowColor * strength, direction);
	}
	return LightSample(illuminance * strength, direction);
}
